﻿using System;

namespace NWMES
{

    /// <summary>
    /// MES请求结果
    /// </summary>
    public class MesResult
    {
        public bool Success { get; set; }
        public int Code { get; set; } = -999;
        public string Message { get; set; }
        public string ExMessage { get; set; }
        public bool HasException { get; set; }
        public DateTime BeginTime { get; set; }
        public DateTime EndTime { get; set; }
        public string Request { get; set; }

        public string ResponeJson { get; set; }
        public dynamic Respone { get; set; }

        public string Result { get; set; }

        public dynamic ret { get; set; }
        public string customerBarcode { get; set; }

        public string[] sfcArray { get; set; }
        public string sfc { get; set; }

        public MesResult() { }

        public MesResult(int _Code, string _Message)
        {
            Code = _Code;
            Message = _Message;
        }

        public string 上阴极1AT { get; set; }

        public static MesResult InitMesResult(string Request)
        {
            return new MesResult
            {
                BeginTime = DateTime.Now,
                Success = false,
                HasException = false,
                Code = -101,
                Request = Request
            };
        }
    }
}
